package com.cj.mobile.iabp.mvp.contract;

import com.cj.mobile.iabp.mvp.model.entity.DeptInfo;
import com.cj.mobile.iabp.mvp.model.entity.DictInfo;
import com.cj.mobile.iabp.mvp.model.entity.PatientInfo;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;

import java.util.List;

import io.reactivex.Observable;

/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 2025/09/24 15:36
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
public interface AddPatientContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        // 显示Loding
        void showLoadingSubmit();

        // 隐藏Loding
        void hideLoadingSubmit();

        void loadDepartment(List<DeptInfo> mList);

        void notDiagnosis();

        void loadDefaultData(PatientInfo info);
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {

        /**
         * 获取科室
         */
        Observable<List<DeptInfo>> getDeptList(String parentId);

        /**
         * 获取诊断
         */
        Observable<List<DictInfo>> getDictList();

        /**
         * 修改患者
         */
        Observable<Integer> updatePatient(String per, String id, String deptSec,
                                          String cnt, String code, String name, String height, String weight, String sex, String age,
                                          String diagnoseF, String diagnose, String diagnoseS,
                                          String deptId, String area, String bedNo,
                                          String friends, String phone);

        /**
         * 添加患者
         */
        Observable<PatientInfo> addPatient(String per, String deptSec,
                                           String cnt, String code, String name, String height, String weight, String sex, String age,
                                           String diagnoseF, String diagnose, String diagnoseS,
                                           String deptId, String area, String bedNo,
                                           String friends, String phone);
    }
}